﻿using System.Collections.Generic;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.GsInfo;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.GoodInfo
{
    public interface IGsExtraInfoReponsitoty
    {
        /// <summary>
        ///     根据货品ID 获取货品额外信息
        /// </summary>
        /// <param name="gsid"></param>
        /// <returns></returns>
        GsExtraInfoEntity GetGsExtraInfoEntityById(long gsid);

        /// <summary>
        ///     获取所有货品信息
        /// </summary>
        /// <returns></returns>
        IEnumerable<GsExtraInfoEntity> GetAllgs();

        /// <summary>
        ///     根据shopid获取货品信息
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        IEnumerable<GsExtraInfoEntity> GetGsExtraInfoByShopId(long shopId);

        /// <summary>
        ///     根据groupid获取货品信息
        /// </summary>
        /// <param name="groupid"></param>
        /// <returns></returns>
        IEnumerable<GsExtraInfoEntity> GetGsExtraInfoByGroupId(long groupid);

        /// <summary>
        ///     根据appid获取货品信息
        /// </summary>
        /// <param name="appid"></param>
        /// <returns></returns>
        IEnumerable<GsExtraInfoEntity> GetGsExtraInfoByAppId(string appid);


        /// <summary>
        ///     根据gsid 删除数据
        /// </summary>
        /// <param name="gsid"></param>
        void RemoveByGsid(long gsid, UnitOfWork unit = null);

        /// <summary>
        ///     刷新售出数
        /// </summary>
        /// <returns></returns>
        void UpdateSellCount(UnitOfWork unit = null);

        /// <summary>
        ///     更新原价
        /// </summary>
        /// <param name="oldprice"></param>
        /// <param name="gsid"></param>
        /// <param name="unit"></param>
        void UpdateOldPrice(decimal oldprice, long gsid, UnitOfWork unit = null);
    }
}